<template>
	<div class="favorite-singer">
        <el-divider content-position="left"
			><h2>我收藏的歌单({{ Songlistcount }})</h2></el-divider
		>
		<!-- <Singerlist :singerlist="favoriteSinger" /> -->
		<div v-if="favoriteSonglist.length == 0">
			<el-empty description="还没有收藏的歌单" :image-size="200"></el-empty>
		</div>
	</div>
</template>

<script setup>
import { ref, computed, onMounted } from 'vue';
import { useStore } from 'vuex';
// import { getSubSinger } from '@/network/myfavorite/myfavorite';
// import Singerlist from '@/components/content/singerlist/Singerlist.vue';


const store = useStore();
// const subSonglist = computed(() => store.getters.subSingerlist);
const favoriteSonglist = ref([]);
const Songlistcount = ref(0);

// 获取歌手信息
// const getSubSingerBy = async () => {
//   try {
//     const res = await getSubSinger();
//     favoriteSinger.value = res.data.data;
//     store.dispatch('saveFavoriteSinger', res.data.data);
//   } catch (error) {
//     console.error('Error fetching singers:', error);
//   }
// };


// onMounted(() => {
//   if (subSingerlist.value.length === 0) {
//     getSubSingerBy();
//   } else {
//     favoriteSinger.value = subSingerlist.value;
//     singercount.value = subSingerlist.value.length;
//   }
// });
</script>



<style lang="less" scoped></style>
